package com.zyf.service;

import com.zyf.mapper.UsersMapper;
import com.zyf.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional
public class UsersServiceImpl implements UsersService{

    @Resource
    UsersMapper mapper;

    @Override
    public List<Users> findAll() {
        return mapper.findAll();
    }

    @Override
    public int delete(Integer uid) {
        return mapper.delete(uid);
    }

    @Override
    public Users findOne(Integer uid) {
        return mapper.findOne(uid);
    }

    @Override
    public int add(Users users) {
        return mapper.add(users);
    }

    @Override
    public int update(Users users) {
        return mapper.update(users);
    }
}
